package org.benjamin.lending.domain.entity;

import java.io.Serializable;
import java.math.BigDecimal;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

@Entity
@Table(name = "tab_member_money")
public class MemberMoney implements Serializable {

	@Id
	@Column(name = "uid")
	private Integer uid;
	
	@Column(name = "money_freeze")
	private BigDecimal moneyFreeze= BigDecimal.ZERO;
	
	@Column(name = "money_collect")
	private BigDecimal monetCollect= BigDecimal.ZERO;
	
	@Column(name = "account_money")
	private BigDecimal accountMoney = BigDecimal.ZERO;
	
	@Transient
	private BigDecimal totalMoney;

	public Integer getUid() {
		return uid;
	}

	public void setUid(Integer uid) {
		this.uid = uid;
	}

	public BigDecimal getMoneyFreeze() {
		return moneyFreeze;
	}

	public void setMoneyFreeze(BigDecimal moneyFreeze) {
		this.moneyFreeze = moneyFreeze;
	}

	public BigDecimal getMonetCollect() {
		return monetCollect;
	}

	public void setMonetCollect(BigDecimal monetCollect) {
		this.monetCollect = monetCollect;
	}

	public BigDecimal getAccountMoney() {
		return accountMoney;
	}

	public void setAccountMoney(BigDecimal accountMoney) {
		this.accountMoney = accountMoney;
	}

	public BigDecimal getTotalMoney() {
		return this.accountMoney.add(moneyFreeze).add(monetCollect);
	}

	public void setTotalMoney(BigDecimal totalMoney) {
		this.totalMoney = totalMoney;
	}
	
	
	
}
